﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="POList.ascx.cs" Inherits="VPNNew.UserContorls.POList" %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div style="height: 280px">
            <scc:GridView ID="gvPO" runat="server" AutoGenerateColumns="False" 
                AutoSaveMultSelectValue="False" DataKeyNames="PONumber" 
                DeleteConfirm="[[AbandonPOConfirm]]" MultSelect="False" 
                NeedCheckAllButton="False" NeedConvertSelectColumn="True" 
                OnRowDataBound="gvPO_RowDataBound" onrowdeleting="gvPO_RowDeleting">
                <Columns>
                    <asp:TemplateField HeaderText="[[PO]]" ItemStyle-HorizontalAlign="Left">
                        <ItemTemplate>
                            <div>
                                <asp:HyperLink ID="HyperLink1" runat="server" 
                                    NavigateUrl='<%# Eval("ProductID", "~/Product.aspx?ProductID={0}") %>' 
                                    Text="<%# ((VPN.DataContext.PO)Container.DataItem).Product.Name %>"></asp:HyperLink>
                            </div>
                            <div style="height: 5px">
                            </div>
                            <div>
                                <asp:HyperLink ID="HyperLink2" runat="server" ForeColor="Gray" 
                                    NavigateUrl='<%# Eval("POID", "~/PODetail.aspx?POID={0}") %>' 
                                    Text='<%# Eval("PONumber") %>'></asp:HyperLink>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="[[Status]]" ItemStyle-Width="40px">
                        <ItemTemplate>
                            <span>
                            <%#string.Format("[[{0}]]",Enum.GetName(typeof(VPN.Manage.POStatus) ,Eval("Status")))%>
                            </span>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="CreateDate" 
                        DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HeaderText="[[CreateDate]]" 
                        ItemStyle-Width="80px" />
                    <asp:HyperLinkField DataNavigateUrlFields="POID" 
                        DataNavigateUrlFormatString="~/Pay.aspx?POID={0}" ItemStyle-Width="28px" 
                        Text="[[Pay]]" />
                    <asp:CommandField DeleteText="[[Abandon]]" ItemStyle-Width="28px" 
                        ShowDeleteButton="True" />
                </Columns>
            </scc:GridView>
        </div>
        <scc:Pager ID="Pager1" runat="server" OnPageIndexChanged="Pager1_PageIndexChanged"
            PageQueryString="page">
        </scc:Pager>
    </ContentTemplate>
</asp:UpdatePanel>
